package com.taotao;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.taotao.ui.filter.AccessFilter;

//@Configuration
//@ComponentScan
//@EnableAutoConfiguration
//@EnableEurekaClient
//@EnableFeignClients
//@EnableCircuitBreaker // 2
@EnableZuulProxy // 3
@SpringCloudApplication
// @ComponentScan(basePackages={"com.taotao.controller","com.taotao.service"})
public class CloudUiApplication {

	public static void main(String[] args) {
		SpringApplication.run(CloudUiApplication.class, args);
	}

	@Bean
	public AccessFilter accessFilter() {
		return new AccessFilter();
	}
}
